<!--
 * @Author: spycym
 * @Date: 2022-11-09 15:21:36
 * @LastEditTime: 2022-11-15 22:40:58
 * @LastEditors: spycym
 * @Description: 
 * 不要随便动我的代码哟!
-->
<script lang="ts" setup>
import todoItem from "./todoItem.vue";
import { useTodoStore } from "../store";
import { storeToRefs } from "pinia";
const todoStore = useTodoStore();
const { todos } = storeToRefs(todoStore);
</script>
<template>
  <ul class="todo-main">
    <todoItem v-for="item in todos" :key="item.id" :todoObj="item"></todoItem>
  </ul>
</template>
<style scoped>
/*main*/
.todo-main {
  margin-left: 0px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding: 0px;
}

.todo-empty {
  height: 40px;
  line-height: 40px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding-left: 5px;
  margin-top: 10px;
}
</style>